package com.lecyon.farm.vo.query;

import com.google.common.collect.Lists;
import com.lecyon.farm.util.StringHelper;
import com.lecyon.farm.vo.base.BaseQueryVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author YaoZheng
 * @since 2020-04-02
 */
@Data
@ApiModel("查询农机当季作业详情Vo")
public class QueryFmWorkDetailsVo extends BaseQueryVo {

    @ApiModelProperty(name = "id", value = "编号(一次作业流水号)")
    private String id;

    @ApiModelProperty(name = "workSerial", value = "一次作业流水号")
    private String workSerial;

    @ApiModelProperty(name = "carId", value = "主机号")
    private String carId;

    @ApiModelProperty(name = "carIdList", value = "农机号集合")
    private List<String> carIdList = Lists.newArrayList();

    @ApiModelProperty(name = "workStarttime", value = "作业开始时间")
    private LocalDateTime workStarttime;

    @ApiModelProperty(name = "workEndtime", value = "作业结束时间")
    private LocalDateTime workEndtime;

    @ApiModelProperty(name = "queryBeginTime", value = "查询开始时间")
    private LocalDateTime queryBeginTime;

    @ApiModelProperty(name = "queryEndTime", value = "查询结束时间")
    private LocalDateTime queryEndTime;

    @ApiModelProperty(name = "location", value = "作业地域")
    private String location;

    @ApiModelProperty(name = "locationCity", value = "作业城市")
    private String locationCity;

    @ApiModelProperty(name = "locationDistrict", value = "作业区县")
    private String locationDistrict;

    @ApiModelProperty(name = "locationTownship", value = "作业乡镇")
    private String locationTownship;

    @ApiModelProperty(name = "carOwner", value = "车主")
    private String carOwner;

    @ApiModelProperty(name = "carOwnerPhone", value = "车主电话")
    private String carOwnerPhone;

    @ApiModelProperty(name = "type", value = "作业类型")
    private String type;

    public String getId() {
        if (StringHelper.isNotEmpty(workSerial)) {
            id = workSerial;
        }
        return id;
    }

}
